<%= render :partial => 'admin/shared/product_sub_menu' %>

<div class='toolbar'>
  <ul class='actions'>
    <li id="new_proto_link">
      <%= button_link_to_remote t("new_prototype"), {
                         :url => new_admin_prototype_url, 
                         :method => :get,
                         :update => "prototypes",
                         :before => "Element.hide('new_proto_link');Element.show('busy_indicator')", 
                         :complete => "Element.hide('busy_indicator')"}, :icon => 'add' %>
    </li>
  </ul>
  <br class='clear' />
</div>


<h1><%=t("prototypes") %></h1>

<%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
<div id="prototypes"></div>

<table class="index">
	<thead>
		<tr>
			<th><%= t("name") %></th>
			<th><%= t("action") %></th>
		</tr>
	</thead>
	<tbody>
    <% @prototypes.each do |prototype| %>
      <tr>
        <td><%= prototype.name %></td>
		    <td class="actions">
		      <%= link_to_edit(prototype) %>
		      &nbsp;
		      <%= link_to_delete(prototype) %>
		    </td>        
      </tr>
    <% end %>
  </tbody>
</table>
